import request from '@/utils/request'

// 分配学员
export function assignPlayer(userIds, clazzId) {
  return request({
    url: '/manager/clazz/assign',
    method: 'post',
    data: {
      userIds: userIds,
      clazzId: clazzId
    }
  })
}

//查询班级详情
export function clazzDetails(query) {
  return request({
    url: '/manager/clazz/details',
    method: 'get',
    params: query
  })
}

// 查询班级列表
export function listClazz(query) {
  return request({
    url: '/manager/clazz/list',
    method: 'get',
    params: query
  })
}

// 查询班级详细
export function getClazz(clazzId) {
  return request({
    url: '/manager/clazz/' + clazzId,
    method: 'get'
  })
}

// 新增班级
export function addClazz(data) {
  return request({
    url: '/manager/clazz',
    method: 'post',
    data: data
  })
}

// 修改班级
export function updateClazz(data) {
  return request({
    url: '/manager/clazz',
    method: 'put',
    data: data
  })
}

// 删除班级
export function delClazz(clazzId) {
  return request({
    url: '/manager/clazz/' + clazzId,
    method: 'delete'
  })
}
